In my previous articles in the "Bridging AI and ERPs" series, we explored how to [connect Claude AI with SAP systems using MCP](https://www.linkedin.com/pulse/bridging-ai-erps-how-connect-claude-sap-systems-mcp-julien-delvat-52gvc/?trackingId=8Hs9tMM0TfKqKl1DEPL80Q%3D%3D) and how to [meet organizations where they are](https://www.linkedin.com/pulse/bridging-ai-erps-meeting-organizations-where-they-julien-delvat) without requiring expensive ERP upgrades.
Today, I want to share a practical implementation that takes this concept further: **connecting an ERP system to a Large Language Model (LLM) like Claude by building a connector (MCP server) that connects to a data warehouse (Google BigQuery), where the ERP data is replicated**.
> In short, we want to build a translator that lets business users ask ERP data questions in plain English, without needing IT support.
This approach is particularly relevant for organizations that already rely on Google Cloud or similar data warehousing solutions, where enterprise data has been consolidated but remains difficult to access for business users who lack SQL expertise or technical training.
Demo video: Claude answers "From the Accounts Payable data, show me aging buckets and identify vendors with overdue payments beyond 60 days"
## The Challenge: The Last Mile of Data Democratization
Many organizations have successfully implemented data warehouses: consolidating data from Finance (SAP), Sales (Salesforce), HR (Workday), and other enterprise systems into platforms like Google BigQuery, Snowflake, or Databricks. These investments deliver significant value to data analysts and BI teams, but a gap remains: **business users still can't easily ask questions directly against their own data**.
Consider a typical scenario:
- A controller wants to analyze accounts payable aging trends,
- A procurement manager needs to identify vendor performance issues,
- A sales director wants to understand order-to-cash cycle times.
Today, these questions require:
1. Submitting a request to the BI team,
2. Waiting for report development (days or weeks),
3. Iterating on requirements,
4. Finally receiving static reports that are outdated by the time they arrive.
What if business users could simply ask these questions in natural language and get immediate answers from their data warehouse?
## The Solution: Google BigQuery + Claude + MCP
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), introduced by Anthropic, provides the missing piece to connect data locked in your data warehouse with your favorite Large Language Model (LLM), like Claude. By building an MCP server that connects to Google BigQuery, we can enable Claude AI to:
1. **List available tables** in your data warehouse,
2. **Describe table schemas** to understand data structures,
3. **Execute SQL queries** based on natural language questions,
4. **Return results** in conversational, business-friendly language.
The architecture is elegant in its simplicity:

Architecture Diagram showing the integration of Claude Code / Claude Desktop with SAP ECC or S/4HANA through Google BigQuery via an MCP wrapper and/or a Google Cloud Run endpoint.
## Implementation: Three Deployment Models
The beauty of this solution is its flexibility. You can deploy it three ways:
### 1\. Local MCP Server (Development & Testing)
Perfect for development and individual use:
- Runs on your laptop,
- Uses service account credentials (can be switched to Single Sign-On),
- Connects to Claude Code or Claude Desktop,
- No infrastructure needed.
### 2\. Serverless Function (Production HTTP API)
For team-wide access and integration, we rely on Google Cloud Functions, which are cloud services that can automatically scale to handles requests as needed
:
- Deployed as serverless function,
- Scales automatically,
- Provides REST API endpoint,
- Enables cross-platform integration.
### 3\. Hybrid (Best of Both Worlds)
Most organizations will want both:
- Local MCP for power users (analysts, finance team),
- Cloud endpoint for applications and broader access,
- Single codebase deployed two ways.
## Secret Sauce: Leverage Pre-Built Data Models
Data teams are frequently slowed down in their ability to make data from ERP systems like SAP available for the stakeholders due to a lack of semantic models. Simply replicating database tables from a source system into a data lake is not enough to perform queries and derive insights.
Luckily, hyperscalers have already prepared that work and made it available for faster adoption, sometimes for free. In the context of Google Cloud, the Cortex semantic model is available, which makes ERP data from systems like SAP ECC or S/4HANA easier to analyze (source: [Google Cloud Cortex Framework](https://cloud.google.com/solutions/cortex?hl=en) / [Data sources and workloads](https://cloud.google.com/cortex/docs/data-sources-and-workloads) / [Reference Architecture](https://docs.cloud.google.com/sap/docs/bq-connector/latest/overview)).

Reference Architecture for SAP Replication into the Google Cloud Cortex Framework. Source: Google Cloud
## Real-World Example: SAP Cortex Reporting
Let me share a concrete example from a typical SAP Cortex deployment. The semantic model describes 115 tables from the data warehouse, including:
**Financial Data:**
- AccountingDocuments (26,695 sample transactions)
- BalanceSheet
- ProfitAndLoss
- AccountsPayable
**Sales Data:**
- SalesOrders (10,374 sample orders)
- Billing
- OrderToCash
- SalesFulfillment
**Inventory Data:**
- StockMonthlySnapshots
- InventoryByPlant
- MaterialsMovement
**Master Data:**
- CustomersMD
- VendorsMD
- MaterialsMD
With the MCP server in place, users can simply ask Claude:
```
Query: "Show me the top 5 sales orders by net value from last quarter"
```
Claude's Response:
```
Here are the top 5 sales orders by net value:
| Sales Document | Creation Date | Net Price | Currency |
|----------------|---------------|-----------|----------|
| 0000001860 | 2022-03-19 | 150,000 | USD |
| 0000001861 | 2022-03-19 | 147,500 | USD |
| 0000001862 | 2022-03-19 | 142,500 | USD |
| 0000001883 | 2022-03-19 | 120,000 | USD |
| 0000001229 | 2022-03-16 | 85,920 | USD |
The highest sales order is document 0000001860 with a net value of $150,000 USD, created on March 19, 2022.
```
Behind the scenes, Claude performed the following actions:
1. Called the MCP server's list\_tables tool to see available data
2. Called describe\_table to understand the SalesOrders schema
3. Generated appropriate SQL *(see below)*
4. Executed the query via query\_bigquery tool 5. Formatted the results conversationally
From a technical perspective, here's the SQL query that Claude performed in the background, without the user having to know anything about the database table names, field structures, or even SQL syntax:
```
SELECT SalesDocument_VBELN, CreationDate_ERDAT, NetPrice_NETWR, Currency_WAERK FROM cortex_sap_reporting.SalesOrders ORDER BY NetPrice_NETWR DESC LIMIT 5
```
No SQL knowledge required. No ticket to the BI team. Instant insights.
## Use Cases: What This Enables
Once deployed, this MCP server unlocks numerous use cases:
### Financial Analysis
- *"Calculate our days sales outstanding by customer segment"*
- *"Show me month-over-month P&L variance analysis"*
- *"Which vendors have payment terms over 60 days?"*
### Sales & Revenue Operations
- *"Analyze order-to-cash cycle time by region"*
- *"Identify customers with declining order values"*
- *"Calculate win rates by product category"*
### Inventory & Supply Chain
- *"Show me slow-moving inventory by warehouse"*
- *"Calculate inventory turnover ratios by material group"*
- *"Which materials have stock below reorder points?"*
### Executive Dashboards
- *"Create a quarterly business review with key metrics"*
- *"Compare this quarter's performance to last year"*
- *"What are our top 5 operational bottlenecks?"*
## Where to Start: Implementation
To help business technologists on this journey, I open-sourced this implementation of the local MCP server and Google Cloud Run function, at [github.com/CostingGeek/mcp-bigquery-server](https://github.com/CostingGeek/mcp-bigquery-server). The code, documentation, and deployment guides are all available to accelerate your implementation.
### A Note on Security Model
For simplicity, this proof-of-concept showcases an service account approach. In an enterprise setup, more governance would be required for a safer authentication with standard protocols that are readily available in hyperscaler toolboxes:
- Authentication: Service account + IAM for Cloud Run; User credentials for local MCP
- Authorization: BigQuery row-level security enforced at data layer
- Audit: All queries logged to Cloud Logging with user attribution
## Why This Matters: The Bigger Picture
This implementation represents more than just a technical integration: it's a fundamental shift in how enterprises interact with their data:
**From:**
- Data locked in warehouses
- Requiring SQL expertise
- IT-mediated access
- Days or weeks for answers
**To:**
- Natural language access
- Business user self-service
- Immediate insights
- AI-powered analysis
Most importantly, **this approach doesn't require replacing existing systems**. Your BigQuery data warehouse remains the source of truth. Your SAP system continues running unchanged. You're simply adding an intelligent access layer that makes existing investments more valuable. For the **68% of SAP customers who haven't yet migrated to SAP S/4HANA**, and for organizations running any legacy ERP, this provides a path to modern AI capabilities without waiting for expensive upgrades. While competitors wait 2-3 years for ERP upgrades, we can deploy AI-powered decision-making in weeks, gaining a significant competitive edge.
## Conclusion: Pragmatic Enablement
There are many hurdles on the way to digital automation in finance and accounting. *“While finance departments have made reasonable progress in laying the groundwork for AI, the challenges come when attempting to scale up solutions that can manage the complexities of function-wide use,*” said [Sanjay Champaneri](https://www.gartner.com/en/experts/sanjay-champaneri), senior director analyst in the Gartner Finance practice. (source: [Gartner](https://www.gartner.com/en/newsroom/press-releases/2022-06-07-gartner-predicts-half-of-finance-ai-projects-will-be-delayed-or-cancelled-by-2024))
The market is moving fast. Organizations that wait for their ERP vendors to deliver embedded AI, or for their organizations to invest in a massive ERP upgrade, will be left behind. The good news? You don't have to wait. With tools like MCP, Google BigQuery, and Claude by Anthropic, you can deliver transformative AI capabilities today, using infrastructure you already have.
## Resources
- [GitHub Repository:](https://github.com/CostingGeek/mcp-bigquery-server) [**github.com/CostingGeek/mcp-bigquery-server**](http://github.com/CostingGeek/mcp-bigquery-server)
- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
- [Google BigQuery Documentation](https://cloud.google.com/bigquery/docs)
- [**Google Cloud Cortex - Framework**](https://cloud.google.com/solutions/cortex?hl=en)
- [**Google Cloud Cortex - Sources and Workloads**](https://cloud.google.com/cortex/docs/data-sources-and-workloads)
- [**Google Cloud Cortex - Reference Architecture**](https://docs.cloud.google.com/sap/docs/bq-connector/latest/overview)
- [Claude Code Documentation](https://docs.claude.com/en/docs/claude-code)
- [Bridging AI and ERPs: How to Connect Claude to SAP Systems with MCP](https://www.linkedin.com/pulse/bridging-ai-erps-how-connect-claude-sap-systems-mcp-julien-delvat)
- [Bridging AI and ERPs: Meeting Organizations Where They Are](https://www.linkedin.com/pulse/bridging-ai-erps-meeting-organizations-where-they-julien-delvat)
- [Gartner: Half of Finance AI Projects Will Be Delayed or Cancelled By 2024](https://www.gartner.com/en/newsroom/press-releases/2022-06-07-gartner-predicts-half-of-finance-ai-projects-will-be-delayed-or-cancelled-by-2024)
#AI #BigQuery #MCP #EnterpriseAI #DataWarehouse #SAP #CloudComputing #DigitalTransformation #BusinessIntelligence #DataDemocratization
← Back to Knowledge Base